/**
@Description  请填写文件描述（需要改）
@author: freedom
@date: 2021/5/15
@note:
**/
package initialize

import (
	"gin-vue-admin/global"
	"gin-vue-admin/utils/fdfs"
	"go.uber.org/zap"
)

// 初始化fastdfs配置
func FastDFS() {
	client, err := fdfs.NewClientWithConfig(global.GVA_CONFIG.FastDFS.TrackerServer, global.GVA_CONFIG.FastDFS.MaxConns)
	if err != nil {
		global.GVA_LOG.Error("fastdfs connect create failed, err:", zap.Any("err", err))
	} else {
		global.GVA_LOG.Info("fastdfs connect success:", zap.String("success", "success"))
		global.GVA_FASTDFS = client
	}
}
